import { createApp } from 'vue'
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import store from './store'
const {ipcRenderer} = require('electron')
import tools from '@/utils/tools.js'
// 导入axios，配置全局axios，放在vue的原型上
import { myAxios, otherAxios } from '@/axios'

// 构建Vue
const app = createApp(App); 
// 将示例对象挂载到Vue全局，方便调用，不用重复构造重复引入
app.config.globalProperties.$ipc = ipcRenderer;
app.config.globalProperties.$axios = myAxios;
app.config.globalProperties.$elaxios = otherAxios;
app.config.globalProperties.$tools = tools;
// 引入Element-plus库的小图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
} 
  
app.use(router).use(store).use(ElementPlus).mount("#app");
